<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>My Project: drogon::DrTemplateBase类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacedrogon.html">drogon</a></li><li class="navelem"><a class="el" href="classdrogon_1_1DrTemplateBase.html">DrTemplateBase</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="classdrogon_1_1DrTemplateBase-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">drogon::DrTemplateBase类 参考<span class="mlabels"><span class="mlabel">abstract</span></span></div></div>
</div><!--header-->
<div class="contents">

<p>The templating engine class  
 <a href="classdrogon_1_1DrTemplateBase.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="DrTemplateBase_8h_source.html">DrTemplateBase.h</a>&gt;</code></p>
<div class="dynheader">
类 drogon::DrTemplateBase 继承关系图:</div>
<div class="dyncontent">
<div class="center"><img src="classdrogon_1_1DrTemplateBase__inherit__graph.png" border="0" usemap="#adrogon_1_1DrTemplateBase_inherit__map" alt="Inheritance graph"/></div>
<map name="adrogon_1_1DrTemplateBase_inherit__map" id="adrogon_1_1DrTemplateBase_inherit__map">
<area shape="rect" title="The templating engine class" alt="" coords="85,79,268,104"/>
<area shape="rect" href="classdrogon_1_1DrTemplate.html" title=" " alt="" coords="5,152,156,192"/>
<area shape="poly" title=" " alt="" coords="154,115,106,154,102,150,150,111"/>
<area shape="rect" href="classdrogon_1_1DrTemplate.html" title=" " alt="" coords="180,159,368,185"/>
<area shape="poly" title=" " alt="" coords="203,111,261,157,258,161,200,115"/>
<area shape="rect" href="classdrogon_1_1DrObjectBase.html" title="The base class for all drogon reflection classes." alt="" coords="95,5,259,31"/>
<area shape="poly" title=" " alt="" coords="179,44,179,79,174,79,174,44"/>
<area shape="rect" href="classdrogon_1_1NotFound.html" title="This class is used by the drogon to generate the 404 page. Users don&#39;t use this class directly." alt="" coords="12,240,149,265"/>
<area shape="poly" title=" " alt="" coords="83,206,83,240,78,240,78,206"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">图例</a>]</span></center></div>
<div class="dynheader">
drogon::DrTemplateBase 的协作图:</div>
<div class="dyncontent">
<div class="center"><img src="classdrogon_1_1DrTemplateBase__coll__graph.png" border="0" usemap="#adrogon_1_1DrTemplateBase_coll__map" alt="Collaboration graph"/></div>
<map name="adrogon_1_1DrTemplateBase_coll__map" id="adrogon_1_1DrTemplateBase_coll__map">
<area shape="rect" title="The templating engine class" alt="" coords="5,79,188,104"/>
<area shape="rect" href="classdrogon_1_1DrObjectBase.html" title="The base class for all drogon reflection classes." alt="" coords="15,5,179,31"/>
<area shape="poly" title=" " alt="" coords="99,44,99,79,94,79,94,44"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">图例</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a2f1140e2c3db012d806bf1e9cefe7847" id="r_a2f1140e2c3db012d806bf1e9cefe7847"><td class="memItemLeft" align="right" valign="top">virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1DrTemplateBase.html#a2f1140e2c3db012d806bf1e9cefe7847">genText</a> (const <a class="el" href="namespacedrogon.html#a82989d7ab651356c1bfab45376492c31">DrTemplateData</a> &amp;data=<a class="el" href="namespacedrogon.html#a82989d7ab651356c1bfab45376492c31">DrTemplateData</a>())=0</td></tr>
<tr class="memdesc:a2f1140e2c3db012d806bf1e9cefe7847"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate the text string  <br /></td></tr>
<tr class="separator:a2f1140e2c3db012d806bf1e9cefe7847"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9b13bf52e52ca073f85bde83d739081" id="r_ad9b13bf52e52ca073f85bde83d739081"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1DrTemplateBase.html#ad9b13bf52e52ca073f85bde83d739081">~DrTemplateBase</a> ()</td></tr>
<tr class="separator:ad9b13bf52e52ca073f85bde83d739081"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8a895f0173b360aa09d77795001bcad" id="r_ad8a895f0173b360aa09d77795001bcad"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1DrTemplateBase.html#ad8a895f0173b360aa09d77795001bcad">DrTemplateBase</a> ()</td></tr>
<tr class="separator:ad8a895f0173b360aa09d77795001bcad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classdrogon_1_1DrObjectBase"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classdrogon_1_1DrObjectBase')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classdrogon_1_1DrObjectBase.html">drogon::DrObjectBase</a></td></tr>
<tr class="memitem:a3b6f9f93fce1cb61c43bebea00b77582 inherit pub_methods_classdrogon_1_1DrObjectBase" id="r_a3b6f9f93fce1cb61c43bebea00b77582"><td class="memItemLeft" align="right" valign="top">virtual const std::string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1DrObjectBase.html#a3b6f9f93fce1cb61c43bebea00b77582">className</a> () const</td></tr>
<tr class="memdesc:a3b6f9f93fce1cb61c43bebea00b77582 inherit pub_methods_classdrogon_1_1DrObjectBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the class name  <br /></td></tr>
<tr class="separator:a3b6f9f93fce1cb61c43bebea00b77582 inherit pub_methods_classdrogon_1_1DrObjectBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a847a57ab1e5cac6e70a910ae5e3f759b inherit pub_methods_classdrogon_1_1DrObjectBase" id="r_a847a57ab1e5cac6e70a910ae5e3f759b"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1DrObjectBase.html#a847a57ab1e5cac6e70a910ae5e3f759b">isClass</a> (const std::string &amp;class_name) const</td></tr>
<tr class="memdesc:a847a57ab1e5cac6e70a910ae5e3f759b inherit pub_methods_classdrogon_1_1DrObjectBase"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if the class name is 'class_name'  <br /></td></tr>
<tr class="separator:a847a57ab1e5cac6e70a910ae5e3f759b inherit pub_methods_classdrogon_1_1DrObjectBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a57e74527aea2d71d9f471b39c70d1b inherit pub_methods_classdrogon_1_1DrObjectBase" id="r_a3a57e74527aea2d71d9f471b39c70d1b"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1DrObjectBase.html#a3a57e74527aea2d71d9f471b39c70d1b">~DrObjectBase</a> ()</td></tr>
<tr class="separator:a3a57e74527aea2d71d9f471b39c70d1b inherit pub_methods_classdrogon_1_1DrObjectBase"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:abda5019c5f6e95674838ad81f29622b7" id="r_abda5019c5f6e95674838ad81f29622b7"><td class="memItemLeft" align="right" valign="top">static std::shared_ptr&lt; <a class="el" href="classdrogon_1_1DrTemplateBase.html">DrTemplateBase</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdrogon_1_1DrTemplateBase.html#abda5019c5f6e95674838ad81f29622b7">newTemplate</a> (const std::string &amp;templateName)</td></tr>
<tr class="memdesc:abda5019c5f6e95674838ad81f29622b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an object of the implementation class  <br /></td></tr>
<tr class="separator:abda5019c5f6e95674838ad81f29622b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>The templating engine class </p>
<p>This class can generate a text string from the template file and template data. For more details on the template file, see the wiki site (the 'View' section) </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="ad9b13bf52e52ca073f85bde83d739081" name="ad9b13bf52e52ca073f85bde83d739081"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9b13bf52e52ca073f85bde83d739081">&#9670;&#160;</a></span>~DrTemplateBase()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual drogon::DrTemplateBase::~DrTemplateBase </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="ad8a895f0173b360aa09d77795001bcad" name="ad8a895f0173b360aa09d77795001bcad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad8a895f0173b360aa09d77795001bcad">&#9670;&#160;</a></span>DrTemplateBase()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">drogon::DrTemplateBase::DrTemplateBase </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a2f1140e2c3db012d806bf1e9cefe7847" name="a2f1140e2c3db012d806bf1e9cefe7847"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f1140e2c3db012d806bf1e9cefe7847">&#9670;&#160;</a></span>genText()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::string drogon::DrTemplateBase::genText </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacedrogon.html#a82989d7ab651356c1bfab45376492c31">DrTemplateData</a> &amp;&#160;</td>
          <td class="paramname"><em>data</em> = <code><a class="el" href="namespacedrogon.html#a82989d7ab651356c1bfab45376492c31">DrTemplateData</a>()</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Generate the text string </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>represents data rendered in the string in a format according to the template file. </td></tr>
  </table>
  </dd>
</dl>

<p>在 <a class="el" href="classdrogon_1_1NotFound.html#a2a036e3abd0ffd0ba3ae29a145347116">drogon::NotFound</a> 内被实现.</p>

</div>
</div>
<a id="abda5019c5f6e95674838ad81f29622b7" name="abda5019c5f6e95674838ad81f29622b7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abda5019c5f6e95674838ad81f29622b7">&#9670;&#160;</a></span>newTemplate()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static std::shared_ptr&lt; <a class="el" href="classdrogon_1_1DrTemplateBase.html">DrTemplateBase</a> &gt; drogon::DrTemplateBase::newTemplate </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>templateName</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create an object of the implementation class </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">templateName</td><td>represents the name of the template file. A template file is a description file with a special format. Its extension is usually .csp. The user should preprocess the template file with the drogon_ctl tool to create c++ source files. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li><a class="el" href="DrTemplateBase_8h_source.html">DrTemplateBase.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>
